package com.business.system.service.impl;

import java.util.List;
import java.util.Map;

import com.business.system.service.GoodsService;
import net.sf.rose.jdbc.service.Service;

import com.business.system.service.BrandService;
import com.business.system.util.DBTools;

/**
 * @author: xudy
 * @date: 2018/04/11 13:57
 * @description:
 */
@org.springframework.stereotype.Service
public class GoodsServiceImpl implements GoodsService {
    @Override
    public List<Map<String, Object>> brandGoodsByBrandId(Service service, String brandId) {
        StringBuilder sql = new StringBuilder();
        sql.append("select t1.*,t2.STOCK_COUNT from goods t1 left join goods_store t2 on t1.ID=t2.GOODS_ID where 1=1");
        sql.append(" and t1.IS_SHELF=0 and t1.BRAND_ID=?");
        return DBTools.getDataList(service,sql.toString(),brandId);
    }
}